package com.camartsApp.Util;


import com.camartsApp.common.ResultVO;

public class Response {


    // 成功
    public static ResultVO OkByData(Object data) {
        return new ResultVO(ResultVO.SUCCESS, "success", data);
    }

    public static ResultVO OkByMsg(String message) {
        return new ResultVO(ResultVO.SUCCESS, message, null);
    }


    public static ResultVO OkByDataAndMsg(Object data, String message) {
        return new ResultVO(ResultVO.SUCCESS, message, data);
    }


    // 失败
    public static ResultVO FailResultByData(Object data) {

        return new ResultVO(ResultVO.FAIL, "fail", data);
    }

    public static ResultVO FailResultByMsg(String message) {
        return new ResultVO(ResultVO.FAIL, message, null);
    }

    public static ResultVO FailByDataAndMsg(String message, Object data) {
        return new ResultVO(ResultVO.FAIL, message, data);
    }


}
